<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>当当购物车</title>
    <link rel="stylesheet" href="./css/cart.css">

</head>

<body>
    <div class="container" id="cart1">
        <div class="logo">
            <img src="./image/dd_logo.jpg" alt="logo"><button class="product-add">添加商品</button>
        </div>
        <div class="cart-list">
            <!-- 动态渲染table表格,通过商品数组 -->
        </div>
        <div class="cart-add">
            <a href="javascript:void(0)" class="close">&times;</a>
            <form>
                <input type="text" name="name" placeholder="请输入商品名称"><br>
                <input type="text" name="price" placeholder="请输入商品价格"><br>
                <input type="text" name="num" placeholder="请输入商品数量"><br>
                <input type="text" name="url" placeholder="请输入商品图片地址"><br>
                <button class="add-btn">添加商品</button>
            </form>
        </div>
    </div>


    <div class="container" id="cart2">
        <div class="logo">
            <img src="./image/dd_logo.jpg" alt="logo"><button class="product-add">添加商品</button>
        </div>
        <div class="cart-list">
            <!-- 动态渲染table表格,通过商品数组 -->
        </div>
        <div class="cart-add">
            <a href="javascript:void(0)" class="close">&times;</a>
            <form>
                <input type="text" name="name" placeholder="请输入商品名称"><br>
                <input type="text" name="price" placeholder="请输入商品价格"><br>
                <input type="text" name="num" placeholder="请输入商品数量"><br>
                <input type="text" name="url" placeholder="请输入商品图片地址"><br>
                <button class="add-btn">添加商品</button>
            </form>
        </div>
    </div>

    <script type="module">
        import Cart from './js/cart.js'
        let cart1 = new Cart('#cart1')
        cart1.init('CART-01')

        let cart2 = new Cart('#cart2')
        cart2.init('CART-02')
        
    </script>
</body>

</html>